<?php
/*************************************************************************
Admin Logout module
----------------------------------------------------------------
Derasoft CMS Project
Company: Derasoft Co., Ltd                                  
Email: info@derasoft.com                                    
Last updated: 02/07/2008
**************************************************************************/
$lang = $request->element("lang");
$_SESSION['memberId'] = '';
/*$_SESSION['userName'] = '';
$_SESSION['userType'] = 0;*/		
if(isset($_SESSION['Id'])) {
	$_SESSION['memberId'] = $_SESSION['Id'];
	$_SESSION['Id'] = '';
		header('location: '.SCRIPT."index.php?op=login&lang=$lang");

} else {
	if (URL_TYPE==1)
		header("location: ".$_SERVER['HTTP_REFERER']);
	else
		header("location: ".$_SERVER['HTTP_REFERER']);
	
}
?>